//Clase que gestiona funcionalidad generica del layout de la aplicacion
var EBLayoutManager = Class.create( );
EBLayoutManager.prototype = {

	initialize: function( ) {
		this.columnRightWidth = getCSSRule('#column-right').style.width;
	},
	
	showEventListTab: function(node) {
		new Effect.Fade('undevents-zone', {duration: 0.2, queue: {position:'end', scope: 'eventstab'} });
		new Effect.Appear('event-list', {duration: 0.2, queue: {position:'end', scope: 'eventstab'} });
		Element.removeClassName(node.nextSibling, 'selected');		
		Element.addClassName(node, 'selected');
	},
	
	showUndefinedEventsTab: function(node) {
		new Effect.Fade('event-list', {duration: 0.2, queue: {position:'end', scope: 'eventstab'} });
		new Effect.Appear('undevents-zone', {duration: 0.2, queue: {position:'end', scope: 'eventstab'} });
		Element.removeClassName(node.previousSibling, 'selected');
		Element.addClassName(node, 'selected');
	},
	
	browserWide: function(node) {
		Element.hide(node);
		Element.show(node.nextSibling);
		new Effect.Fade('column-left', {duration: 0.4, afterFinish: function() { Element.setStyle('column-right', {width: '100%'}); } });
	},
	
	browserSmall: function(node) {
		Element.hide(node);
		Element.show(node.previousSibling);
		Element.setStyle('column-right', {width: this.columnRightWidth});
		new Effect.Appear('column-left', {duration: 0.4});
	}

}
